Class MusicVideo


  • public class MusicVideo
    extends Release
    This class represents a music video as a concrete release of a specific artist.
    A music video is a video presentation for a single track and has the same duration as the track.
    Since:
    ExerciseSheet04
    Version:
    1
    Author:
    Jonas Altrock (ew20b126@technikum-wien.at)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Track track
      The track of this music video.
    • Constructor Summary

      Constructors 
      Constructor Description
      MusicVideo()
      Default constructor.
    • Field Detail

      • track

        private Track track
        The track of this music video.
    • Constructor Detail

      • MusicVideo

        public MusicVideo()
        Default constructor.
    • Method Detail

      • getTrack

        public Track getTrack()
        Gets the track of this music video.
        Returns:
        the track
      • setTrack

        public void setTrack​(Track track)
        Sets the track of this music video.
        Parameters:
        track - the track to set
      • totalTime

        public int totalTime()
        Gets the total running time of this music video.
        Specified by:
        totalTime in class Release
        Returns:
        the total running time in seconds.
      • toString

        public java.lang.String toString()
        Gets a String representation of this music video.

        The String representation of a music video simply adds "-(Video)" (without quotes) to the String representation of a general release.

        Overrides:
        toString in class Release
        Returns:
        the string representation